package indi.zhifa.engine.test.controller;

import indi.zhifa.engine.core.common.web.ann.ZhiFaRestController;
import indi.zhifa.engine.test.entity.dto.CreateUserDto;
import indi.zhifa.engine.test.entity.po.GenUserEntity;
import indi.zhifa.engine.test.service.IAuthService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@Tag(name = "用户测试")
@RequiredArgsConstructor
@ZhiFaRestController
@RequestMapping("/api/test/user")
public class UserController {

    final IAuthService mAuthService;

    @PostMapping
    public GenUserEntity createUser(@RequestBody CreateUserDto pUserDto){
        return mAuthService.createUser(pUserDto);
    }

    @GetMapping("/{id}")
    public GenUserEntity info(@PathVariable("id") Long pId){
        return mAuthService.info(pId);
    }

}
